// index.ts
import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    name: 'Layout',
    path: '/',
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: '',
        name: 'Precipitate',
        component: () => import('@/view/precipitate/index.vue'),
        meta: {
          title: '前台界面'
        }
      },
      {
        path: '/user',
        name: 'User',
        component: () => import('@/view/manage/user/user.vue'),
        meta: {
          title: '用户列表'
        }
      },
      {
        path: '/singer',
        name: 'Singer',
        component: () => import('@/view/manage/singer/index.vue'),
        meta: {
          title: '歌手列表'
        }
      },
      {
        path: '/album',
        name: 'Album',
        component: () => import('@/view/manage/album/index.vue'),
        meta: {
          title: '专辑列表'
        }
      }
    ]
  }
]

export default createRouter({
  history: createWebHistory(),
  routes
})
